/**
 * 公共样式文件
 * 相对路径: inc/pubs.css
 * 作者: 15058593138@qq.com
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2px 0;
}

/* 头部 */
.header {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 18px;
    color: #1a73e8;
}

/* 导航栏 */
.navbar {
    background: #fff;
    padding: 0;
    margin-bottom: 2px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
    white-space: nowrap;
}

.navbar a {
    display: inline-block;
    padding: 12px;
    color: #666;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.navbar a.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.navbar a:hover {
    background: #f5f5f5;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #1a73e8;
    color: #fff;
}

.btn-primary:hover {
    background: #1557b0;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 表单 */
.form-group {
    margin-bottom: 8px;
}

.form-group label {
    display: block;
    margin-bottom: 2px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #1a73e8;
}

/* 表格 */
.table-wrapper {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: bold;
    position: sticky;
    top: 0;
}

.table tr:hover {
    background: #f5f5f5;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    margin-top: 10px;
}

.pagination a,
.pagination select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.pagination a:hover:not(.disabled) {
    background: #1a73e8;
    color: #fff;
}

/* 遮罩层 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 吐司提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    z-index: 2000;
    animation: slideDown 0.3s ease;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #17a2b8;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
/* 座位表 */
.seat-grid {
    display: flex;
    margin: 0 auto;
    gap: 10px;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    overflow-x: auto; /* 防止内容溢出 */
}

.seat-row {
    display: flex;
    flex-direction: column; /* 竖向排列座位 */
    gap: 8px;
}

.seat {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.seat.available {
    background: #fff;
    border-color: #28a745;
}

.seat.available:hover {
    background: #28a745;
    color: #fff;
}

.seat.occupied {
    background: #ccc;
    cursor: not-allowed;
}

.seat.mine {
    background: #dc3545;
    color: #fff;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    margin-bottom: 10px;
}

.search-bar input,
.search-bar select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 响应式 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 16px;
    }
    
    .navbar a {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .seat {
        width: 35px;
        height: 35px;
        font-size: 11px;
    }
    
    .modal-content {
        max-width: 95%;
    }
}